package com.qs.education.controller;

import java.util.HashMap;
import java.util.Map;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.qs.education.bean.api.ResponseListBean;
import com.qs.education.bean.beans.EducationGradeBean;
import com.qs.education.service.IGradeAPPService;

/**
 * @class EducationGradeController
 * @author Leon
 * @description
 * @date Nov 7, 2018
 */
@RestController
@RequestMapping("/grade")
public class EducationGradeController {
	
	@Autowired
	private IGradeAPPService gradeAppService;
	
	private final Logger log = Logger.getLogger(this.getClass());
	/**
	 * @Description 获取所有年级信息
	 * @author Leon
	 * @date   Nov 7, 2018
	 * @param  
	 * @return Map<String,Object>
	 */
	@RequestMapping("/getAllGrade")
	public Map<String,Object> getAllGrade(){
		log.info("APP Grade");
		Map<String,Object> map = new HashMap<String,Object>();
		ResponseListBean<EducationGradeBean> listBean = gradeAppService.getAllGrade();
		map.put("gradeList", listBean);
		return map;
	}
}
